package com.example.router

import com.alibaba.android.arouter.facade.Postcard
import com.alibaba.android.arouter.facade.callback.NavigationCallback
import com.example.base.app.RouterPath


/**
 * 局部降级策略
 */
class LocalDegradeCallBack (private val path:String="",private val group:String=""):NavigationCallback{
    //找到下一个页面
    override fun onFound(postcard: Postcard?) {

    }
    //找不到下一个页面
    override fun onLost(postcard: Postcard?) {
        postcard?.group= RouterPath.GROUP_EMPTY
        postcard?.path= RouterPath.PATH_EMPTY_PAGE
        postcard?.navigation()
    }
    //成功跳转下一个页面
    override fun onArrival(postcard: Postcard?) {

    }
    //跳转页面被拦截
    override fun onInterrupt(postcard: Postcard?) {

    }

}